import Vue from 'vue'
import Index from './index.vue'

import homepage from './homepage.vue'
import companyProfile from './company-profile.vue'
import newsDynamic from './news-dynamic.vue'
import technicalAbility from './technical-ability.vue'
import productCenter from './product-center.vue'
import contactUs from './contact-us.vue'

import VueRouter from 'vue-router'

Vue.use(VueRouter);

const routes = [
  { path: '/', redirect: '/homepage' },
  { path: '/homepage', component: homepage, alias: '/' },
  { path: '/company-profile', component: companyProfile },
  { path: '/news-dynamic', component: newsDynamic },
  { path: '/technical-ability', component: technicalAbility },
  { path: '/product-center', component: productCenter },
  { path: '/contact-us', component: contactUs }
]

const router = new VueRouter({
  routes
})

// window.DEBUGGING = -1 < location.href.indexOf('http://localhost')
window.DEBUGGING = true;

new Vue({
  el: '#app',
  router,
  render: h => h(Index)
})
